import Mock from "mockjs";
const Random = Mock.Random;
export const userData = Mock.mock("/curriculum/list", "get", {
  // 属性 list 的值是一个数组，随机生成 1 到 10 个元素
  "list|1-5": [
    {
      serialNumber: "", //序号
      weekNumber: Random.integer(1, 20), //周
      lessonNumberOfWeek: Random.integer(1, 20), //第几节课
      chapterName: Random.cword(2, 5), //章节名称
      knowledgeObjectives: "", //章节目标
      knowledgePoints: "", //章节知识点
      courseAttachments: "", //课程附件，一般为视频 url
    },
  ],
  code: 200,
  message: "ok",
});
//课堂作业
export const assistantDetail = Mock.mock("/assistant", "get", {
  data: {
    serialNumber: "", //序号
    weekNumber: Random.integer(1, 20), //周
    lessonNumberOfWeek: Random.integer(1, 20), //第几节课
    chapterName: Random.cword(2, 5), //章节名称
    knowledgeObjectives: "", //章节目标
    knowledgePoints: "", //章节知识点
    courseAttachments: "", //课程附件，一般为视频 url
    questions: [
      {
        id: "1", // 每道题的唯一标识符
        type: "1", // 题型：1:单选、2:多选、3:简答
        content:
          "公司财务人员在处理一笔重要业务时，发现了一个可能影响公司利益得溶在风险，但上级领导要求尽快完成业务而忽视该风险。此时，财务人员应该怎么做?", // 题干
        options: [
          "A.按照领导要求完成业务，不考虑风险。",
          "B.自行决定停止业务，解决风险。",
          "C.向领导说明风险，提出合理建议",
          "D.忽视风险，完成业务后再汇报。",
        ],
      },
      {
        id: "2",
        type: "2",
        content:
          "公司财务人员在处理一笔重要业务时，发现了一个可能影响公司利益得溶在风险，但上级领导要求尽快完成业务而忽视该风险。此时，财务人员应该怎么做?", // 题干
        options: [
          "A.按照领导要求完成业务，不考虑风险。",
          "B.自行决定停止业务，解决风险。",
          "C.向领导说明风险，提出合理建议",
          "D.忽视风险，完成业务后再汇报。",
        ],
      },
      {
        id: "3",
        type: "3",
        content: Random.cword(10, 20),
        // 简答题没有选项，所以不需要 "options" 字段
      },
    ],
  },
  code: 200,
  message: "ok",
});

//学生完成情况
export const toolsList = Mock.mock("/tools/list", "get", {
  data: {
    studentScores: [
      {
        id: "student1", // 学生唯一标识符
        name: "张三", // 学生姓名
        studentNumber: "20230101", // 学生学号
        completion: "已完成", // 完成情况
        singleChoiceScore: 10, // 单选题评分
        multipleChoiceScore: 10, // 多选题评分
        shortAnswerScore: 15, // 简答题评分
        evaluation: [10, 10, 10, 10, 10], // 核心素养评价，用于显示雷达图
      },
      {
        id: "student2",
        name: "李四",
        studentNumber: "20230102",
        completion: "未完成",
        singleChoiceScore: 5,
        multipleChoiceScore: 6,
        shortAnswerScore: 7,
        evaluation: [5, 6, 7, 8, 9], // 核心素养评价，用于显示雷达图
      },
    ],
    //
  },
  code: 200,
  message: "ok",
});

//Ppt 模版数据
export const pptList = Mock.mock("/ppt/list", "get", {
  data: {
    pptTemplates: [
      {
        id: "1", // PPT 模板的唯一标识符
        templateName: "商务报告模板", // PPT 模板名称
        previewImage: "business_report_preview.jpg", // PPT 模板预览图的文件名或 URL
      },
      {
        id: "2",
        templateName: "教育课件模板",
        previewImage: "education_courseware_preview.jpg",
      },
      {
        id: "3",
        templateName: "创意设计模板",
        previewImage: "creative_design_preview.jpg",
      },
      // 更多 PPT 模板...
    ],
  },
  code: 200,
  message: "ok",
});

//目录数据
export const catalogue = Mock.mock("/catalogue/list", "get", {
  data: {
    "list|1-5": [
      {
        knowledgePoints: Random.cword(2, 5), //章节知识点
        courseAttachments: "", //课程附件，一般为视频url
      },
    ],
  },
  code: 200,
  message: "ok",
});
